package com.burst.reptile.modular.zp.service.impl;

import com.burst.reptile.modular.zp.entity.ZpHeat;
import com.burst.reptile.modular.zp.mapper.ZpHeatMapper;
import com.burst.reptile.modular.zp.service.IZpHeatService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import java.util.List;

import org.springframework.stereotype.Service;

/**
 * <p>
 * 热搜榜 服务实现类
 * </p>
 *
 * @author wujin
 * @since 2020-06-16
 */
@Service
public class ZpHeatServiceImpl extends ServiceImpl<ZpHeatMapper, ZpHeat> implements IZpHeatService {

	@Override
	public List<ZpHeat> listAll() {
		return this.list(new QueryWrapper<ZpHeat>().orderByAsc("heat_sort"));
	}

	@Override
	public Page<ZpHeat> pageList(int pageNum, int limit) {
		Page<ZpHeat> page = new Page<>(pageNum, limit);
		return this.page(page);
	}

}
